<?php
	session_cache_limiter('private,must-revalide');  
    include_once("config.php");
    $del= $_GET['del'];	
	$id= $_GET['id'];	
	$hou_num= $_GET['hou_num'];	
	$date = date("Y-m-d H:i:s");
	if($del==1)
	{
		$query = "update $TBL_HOUSE SET del=1 where num=$hou_num";
		mysql_query("update $TBL_REINFO set state=1 where id=$id");
	}elseif($del==0){
		$query = "update $TBL_HOUSE SET del=0,add_time='$date' where num=$hou_num";
		mysql_query("delete from $TBL_REINFO where id=$id");
		@mysql_query("delete from $TBL_LEASE where hou_num=$hou_num");
	}else{
		$query = "delete from $TBL_HOUSE where num='$hou_num'";
		mysql_query("delete from $TBL_REINFO where id=$id");
		@mysql_query("delete from $TBL_LEASE where hou_num=$hou_num");
	}
    $res = mysql_query($query) or die(mysql_error());	
	MyNotice("操作成功", 1, "../news.php");
	exit(0);  
  
?>